<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Ela Admin - HTML5 Admin Template</title>
    <meta name="description" content="Ela Admin - HTML5 Admin Template">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../static/css/bootstrap.min.css">
    <link rel="stylesheet" href="../static/css/style.css">
    <script type="text/javascript" src="../static/js/login.js"></script>
    <script type="text/javascript">
        layui.use('table', function(){
            var table = layui.table;
            table.init("demo",{
                // height:500,
                // cellMinWidth: 80,
                page:true,  //开启分页
                limit:3,     //每页展示多少条
                limits:[3,4,5,6],
                toolbar:true,//开启头部工具栏，打印导出，筛选查看
                // totalRow: true  //开启合计
            });
        });
    </script>
</head>
<body>
<table lay-filter="demo" class="layui-table">
    <thead>
    <tr>
        <th lay-data="{field:'oid',sort:true}">编号</th>
        <th lay-data="{field:'ticket'}">姓名</th>
        <th lay-data="{field:'realname',edit:'text'}">航班号</th>
        <th lay-data="{field:'splace'}">出发地</th>
        <th lay-data="{field:'splaces'}">目的地</th>
        <th lay-data="{field:'stime'}">出发时间</th>
        <th lay-data="{field:'etime'}">到达时间</th>
        <th lay-data="{field:'lev'}">舱位</th>
        <th lay-data="{field:'price'}">票价</th>
        <th lay-data="{field:'seat'}">位置</th>
        <th lay-data="{field:'del'}"></th>
    </tr>
    </thead>
    <c:forEach items="${requestScope.purchases}" var="x">
        <tr>
            <td>${x.oid}</td>
            <td>${x.ticket}</td>
            <td>${x.realname}</td>
            <td>${x.splace}</td>
            <td>${x.splaces}</td>
            <td>${x.stime}</td>
            <td>${x.etime}</td>
            <td>${x.lev}</td>
            <td>${x.price}</td>
            <td>${x.seat}</td>
            <td><a href="javascript:del_purchase('${x.oid}')">退票</a></td>
        </tr>
    </c:forEach>
</table>
</body>

</html>










